import { request } from "./request";

export function showGameMessage(giId, uId) {
  return request({
    url: "/gametype/gameInformation",
    method: "GET",
    params: {
      giId,
      uId,
    },
  });
}

export function addVisits(giId) {
  return request({
    url: "/gametype/addVisits",
    method: "GET",
    params: {
      giId,
    },
  });
}

export function likeGame(likeName, pageNum) {
  return request({
    url: "/gametype/likeGame",
    method: "GET",
    params: {
      likeName,
      pageNum,
    },
  });
}

export function isComment(giId, uId) {
  return request({
    url: "/comment/isComment",
    method: "GET",
    params: {
      giId,
      uId,
    },
  });
}

export function commentNew(giId, pageNum, uId) {
  return request({
    url: "/comment/commentNew",
    method: "GET",
    params: {
      giId,
      pageNum,
      uId,
    },
  });
}

export function fabulous(cId, giId, isState, uId) {
  return request({
    url: "/comment/fabulous",
    method: "GET",
    params: {
      cId,
      giId,
      isState,
      uId,
    },
  });
}

export function commentHot(giId, pageNum, uId) {
  return request({
    url: "/comment/commentHot",
    method: "GET",
    params: {
      giId,
      pageNum,
      uId,
    },
  });
}

export function addComment(cContent, cScore, giId, uId) {
  return request({
    url: "/comment/addComment",
    method: "GET",
    params: {
      cContent,
      cScore,
      giId,
      uId,
    },
  });
}

export function replyComments(cId, pageNum) {
  return request({
    url: "/comment/replyComments",
    method: "GET",
    params: {
      cId,
      pageNum,
    },
  });
}

export function addGamereview(cId, giId, grContent, grTouid, uId) {
  return request({
    url: "/comment/addGamereview",
    method: "GET",
    params: {
      cId,
      giId,
      grContent,
      grTouid,
      uId,
    },
  });
}

export function myGameComment(giId, uId) {
  return request({
    url: "/comment/myGameComment",
    method: "GET",
    params: {
      giId,
      uId,
    },
  });
}

export function delComment(cId, giId) {
  return request({
    url: "/comment/delComment",
    method: "GET",
    params: {
      cId,
      giId,
    },
  });
}

export function updComment(cContent, cId, cScore, giId) {
  return request({
    url: "/comment/updComment",
    method: "GET",
    params: {
      cContent,
      cId,
      cScore,
      giId,
    },
  });
}
